package com.atguigu.yygh.controller;

import com.atguigu.yygh.common.result.Result;
import com.atguigu.yygh.service.IDepartmentService;
import com.atguigu.yygh.vo.hosp.DepartmentVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author kabuda
 * @create 2023-03-01 21:04
 */
@Api(tags = "科室控制层")
@RestController
@RequestMapping("/admin/hosp/department")
public class DepartmentController {
    @Resource
    private IDepartmentService departmentService;
    @ApiOperation("查询医院所有科室")
    @GetMapping("/getDeptList/{hoscode}")
    public Result getDeptList(@PathVariable("hoscode") String hoscode){
        List<DepartmentVo> list=departmentService.getDeptList(hoscode);
        return Result.ok(list);
    }
}
